<%@ page language="java" import="java.util.*, com.zjut.zs.applyview.manager.*, com.zjut.zs.applyview.dao.*, com.zjut.an.util.tools.*,com.zjut.an.util.system.*" pageEncoding="utf-8"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%=Config.webname%></title>
	<link href="../plugins/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
	<link href="../plugins/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
	<link href="../plugins/assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
	<link href="../plugins/assets/css/style-metronic.css" rel="stylesheet" type="text/css"/>
	<link href="../plugins/assets/css/style.css" rel="stylesheet" type="text/css"/>
	<link href="../plugins/assets/css/style-responsive.css" rel="stylesheet" type="text/css"/>
	<link href="../plugins/assets/css/plugins.css" rel="stylesheet" type="text/css"/>
	<link rel="shortcut icon" href="favicon.ico" />
	
	<!-- 引入 ECharts 文件 -->
    <script src="../plugins/echarts/echarts.min.js"></script>
</head>
<%
ZsApplyViewManager manager = (ZsApplyViewManager)SpringContextUtil.getBean("ZsApplyViewManager");
%>
<body class="page-header-fixed">
	<jsp:include page="systemrolevalidate.jsp" flush="true">
	<jsp:param name="m" value="systempower"/>
	</jsp:include>
	<div class="clearfix"></div>
	<div class="page-container">
		<div class="">
		
			
			<div class="row">
				<div class="col-md-12">
					
			<%
			int A10 = manager.getDataCountByAB(10,0);
			int A9 = manager.getDataCountByAB(9,0);
			int A8 = manager.getDataCountByAB(8,0);
			int A7 = manager.getDataCountByAB(7,0);
			int A6 = manager.getDataCountByAB(6,0);
			int A5 = manager.getDataCountByAB(5,0);
			int A4 = manager.getDataCountByAB(4,0);
			int A3 = manager.getDataCountByAB(3,0);
			int A2 = manager.getDataCountByAB(2,0);
			int A1 = manager.getDataCountByAB(1,0);
			
			int B10 = manager.getDataCountByAB(0,10);
			int B9 = manager.getDataCountByAB(0,9);
			int B8 = manager.getDataCountByAB(0,8);
			int B7 = manager.getDataCountByAB(0,7);
			int B6 = manager.getDataCountByAB(0,6);
			int B5 = manager.getDataCountByAB(0,5);
			int B4 = manager.getDataCountByAB(0,4);
			int B3 = manager.getDataCountByAB(0,3);
			int B2 = manager.getDataCountByAB(0,2);
			int B1 = manager.getDataCountByAB(0,1);
			 %>	
			<form id="ff" role="form" class="form-horizontal" action="zsApplyViewListSearch.jsp" method="post">  
				<div class="form-group">  
					<label class="col-md-2 control-label" for="name"></label>  
                    <div class="col-md-10">
                    <!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
				    <div id="main" style="width: 800px;height:400px;"></div>
					<script type="text/javascript">
			        // 基于准备好的dom，初始化echarts实例
			        var myChart = echarts.init(document.getElementById('main'));
			
			        
			        option = {
					    title : {
					        text: '学业成绩统计',
					        subtext: '学业成绩A，B人数统计'
					    },
					    tooltip : {
					        trigger: 'axis'
					    },
					    legend: {
					        data:['学业A','学业B']
					    },
					    toolbox: {
					        show : true,
					        feature : {
					            dataView : {show: true, readOnly: false},
					            magicType : {show: true, type: ['line', 'bar']},
					            restore : {show: true},
					            saveAsImage : {show: true}
					        }
					    },
					    calculable : true,
					    xAxis : [
					        {
					        	name:"个A或B",
					            type : 'category',
					            data : ['1','2','3','4','5','6','7','8','9','10']
					        }
					    ],
					    yAxis : [
					        {
					        	name:"人数",
					            type : 'value'
					        }
					    ],
					    series : [
					        {
					            name:'学业A人数',
					            type:'bar',
					            data:[<%=A1-A2 %>,<%=A2-A3 %>, <%=A3-A4 %>, <%=A4-A5 %>, <%=A5-A6 %>, <%=A6-A7 %>,<%=A7-A8 %>,<%=A8-A9 %>, <%=A9-A10 %>, <%=A10%>],
					            label: {
					            	normal: {
					                    show: true,
					                    position: 'top'
					                }
					            },
					        },
					        {
					            name:'学业B人数',
					            type:'bar',
					            data:[<%=B1-B2 %>,<%=B2-B3 %>, <%=B3-B4 %>, <%=B4-B5 %>, <%=B5-B6 %>, <%=B6-B7 %>,<%=B7-B8 %>,<%=B8-B9 %>, <%=B9-B10 %>, <%=B10%>],
					            label: {
					            	normal: {
					                    show: true,
					                    position: 'top'
					                }
					            },
					        }
					    ]
					};
			        
			        // 使用刚指定的配置项和数据显示图表。
			        myChart.setOption(option);
			    	</script>
                    
                    
                    </div>
				</div>
					
                <div class="form-group">  
                    <label class="col-md-2 control-label" for="name"></label>  
                    <div class="col-md-10">  按学业成绩查询  ： 
                          <select name='anum'>
                          <option value='0'>0</option>
                          <option value='1'>1</option>
                          <option value='2'>2</option>
                          <option value='3'>3</option>
                          <option value='4'>4</option>
                          <option value='5'>5</option>
                          <option value='6'>6</option>
                          <option value='7'>7</option>
                          <option value='8'>8</option>
                          <option value='9'>9</option>
                          <option value='10'>10</option>
                          </select>个A　
                          <select name='bnum'>
                          <option value='0'>0</option>
                          <option value='1'>1</option>
                          <option value='2'>2</option>
                          <option value='3'>3</option>
                          <option value='4'>4</option>
                          <option value='5'>5</option>
                          <option value='6'>6</option>
                          <option value='7'>7</option>
                          <option value='8'>8</option>
                          <option value='9'>9</option>
                          <option value='10'>10</option>
                          </select>个B  
                          <input class="form-control" name="searchtype" type="text" id="searchtype" value="ab" style="display:none"/>    
                        <button type="submit" class="btn btn-primary btn-sm">查询 </button> 
                    </div>  
                </div>  
                
            </form> 

				</div>
			</div>
		</div>
	</div>
	<script src="../plugins/assets/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
	<script src="../plugins/assets/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>    
	<script src="../plugins/assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
	<script src="../plugins/assets/plugins/bootstrap-hover-dropdown/twitter-bootstrap-hover-dropdown.min.js" type="text/javascript" ></script>
	<script src="../plugins/assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
	<script src="../plugins/assets/plugins/jquery.blockui.min.js" type="text/javascript"></script>  
	<script src="../plugins/assets/plugins/jquery.cookie.min.js" type="text/javascript"></script>
	<script src="../plugins/assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript" ></script>
	<script src="../plugins/assets/scripts/app.js"></script>  
	
	<script>
	jQuery(document).ready(function() {       
		   App.init();
		});
	
		
	</script>
</body>
</html>